PROG = test
SRC  = $(PROG).c
OBJ  = $(SRC:.c=.o)

CC      = cc
CFLAGS  = -Wall
LDFLAGS = `pkg-config --libs ncurses`

all: $(PROG)

$(PROG): $(OBJ)
	$(CC) $(LDFLAGS) $< -o $@

.c.o:
	$(CC) -c $(CFLAGS) $<

clean:
	-rm $(PROG) $(OBJ)

.PHONY: all clean
